{include file="../view/head" /}
<style>
    /*页面自定义样式*/
    .title h5,.titleb i{
        display: -webkit-box;
        overflow: hidden;
        text-overflow: ellipsis;
        word-wrap: break-word;
        word-break: break-all;
        white-space: normal !important;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }
    .sfzimg>img{height:45px;}
    .sfzimg:hover{
        position: fixed;
        left: 10%;
        top: 10%;
        width: 80%;
        height: 80%;
        z-index: 99;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .sfzimg:hover>img{
        width: auto;
        height: auto;
        max-height: 100%;
        max-width: 100%;
    }
</style>
</head>
<body>
{include file="../view/header" /}
{include file="../view/sidebar" /}
{include file="../view/right-sidebar" /}
<!-- Start #content -->
<div id="content">
    <!-- Start .content-wrapper -->
    <div class="content-wrapper">
        <div class="row">
            <!-- Start .row -->
            <!-- Start .page-header -->
            <div class="col-lg-12 heading hidden-xs hidden-sm">
                <!-- Start .bredcrumb -->
                <ul id="crumb" class="breadcrumb"></ul>
                <!-- End .breadcrumb -->
            </div>
            <!-- End .page-header -->
        </div>
        <!-- End .row -->
        <div class="outlet">
            <!-- Start .outlet -->
            <!-- Page start here ( usual with .row ) -->
            <div class="row">
                <div class="col-md-12">
                    <!-- col-lg-12 start here -->
                    <div class="panel panel-default toggle panelRefresh">
                        <!-- Start .panel -->
                        <div class="panel-body">
                            <table class="table table-bordered table-hover table-striped">
                                <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>卖家</th>
                                    <th>买家</th>
                                    <th>交易单号</th>
                                    <th>卖家留言</th>
                                    <th>买家留言</th>
                                    <th>打款凭证</th>
                                    <th>投诉时间</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {foreach $lists as $list}
                                <tr>
                                    <td><h5 class="m0">{$list.id}</h5></td>
                                    <td>{$list.user}</td>
                                    <td>{$list.buser}</td>
                                    <td>{$list.pid}</td>
                                    <td>{$list.text}</td>
                                    <td>{$list.btext}</td>
                                    <td><?php
                                           if($list['bimage']){
                                        ?>
                                        <a class="sfzimg" href="/{$list.bimage}" target="_blank"><img src="/{$list.bimage}"></a>
                                        <?php
                                            }
                                        ?></td>
                                    <td>{$list.create_time | date='Y-m-d H:i:s',###}</td>
                                    <td>{if condition="$list.zt eq '1'" }已处理{else/}未处理{/if} </td>
                                    <td>
                                       <!-- {if condition="$list.zt neq '1'" }
                                        <a href="{:url('tousu/tscl',['id'=>$list.id,'type'=>1])}" class="mt5 btn btn-xs btn-info">投诉成功</a>
                                        <a href="{:url('tousu/tscl',['id'=>$list.id,'type'=>2])}" class="mt5 btn btn-xs btn-danger">投诉失败</a>
                                        {/if}-->
                                        <?php
                                            if(in_array($list['zt'],[0,2])){
                                        ?>
                                        <a href="{:url('tousu/tscl',['id'=>$list.id,'type'=>1])}" class="mt5 btn btn-xs btn-info">取消交易</a>
                                        <a href="{:url('tousu/tscl',['id'=>$list.id,'type'=>3])}" class="mt5 btn btn-xs btn-danger">交易完成</a>
                                        <?php
                                            }
                                        ?>
         <!--                               <a href="{:url('tousu/tsdel',['id'=>$list.id])}" class="mt5 btn btn-xs btn-danger">删除</a>-->
                                    </td>
                                </tr>
                                {/foreach}
                                </tbody>
                            </table>
                            <div class="row">
                                <div class="col-md-6">
                                    {$lists->render()}
                                </div>
                                <div class="col-md-6">
                                    <p>总数：{$lists->total()}</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- Page End here -->
        </div>
        <!-- End .outlet -->
    </div>
    <!-- End .content-wrapper -->
    <div class="clearfix"></div>
</div>
<!-- End #content -->
{include file="../view/foot" /}
<script>

</script>
</body>
</html>